package org.java.desgin.patterns.builder;

public class ComputerBuilder implements Builder {

	Part cpu,ram,io;
	
	@Override
	public void builderCPU() {
		cpu=new Part();
		cpu.setPartName("cpu");
		System.out.println("builderCPU");
	}

	@Override
	public void builderRAM() {
		ram=new Part();
		ram.setPartName("ram");
		System.out.println("builderRAM");
	}

	@Override
	public void builderIO() {
		io=new Part();
		io.setPartName("io");
		System.out.println("builderIO");
	}

	@Override
	public Computer getComputer() {
		Computer cmp=new Computer();
		cmp.setCpu(cpu);
		cmp.setIo(io);
		cmp.setRam(ram);
		return cmp;
	}

}
